package com.hzjh.base.http.interceptor

import okhttp3.Interceptor
import okhttp3.logging.HttpLoggingInterceptor
import com.hzjh.base.http.BuildConfig
/**
 * 网络请求日志打印
 */
object LoggingInterceptor {
    fun init(): Interceptor {
        val loggingInterceptor = HttpLoggingInterceptor()
        if (BuildConfig.DEBUG) {
            loggingInterceptor.level = HttpLoggingInterceptor.Level.BODY
        } else {
            loggingInterceptor.level = HttpLoggingInterceptor.Level.NONE
        }
        return loggingInterceptor
    }
}